package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.zhangshizhi.web.log.LogVO;
import com.cskaoyan.bean.zhangshizhi.web.log.LogBO;
import com.cskaoyan.config.zhangshizhi.CountTime;
import com.cskaoyan.service.LogService;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 操作日志
 *
 * @author little ants（张时智）
 * @since 2022/06/25 17:05
 */

@RestController
@RequestMapping("admin/log")
public class LogController {

    @Autowired
    LogService logService;

    @CountTime
    @RequiresPermissions(value = {"*","admin:log:list"},logical = Logical.OR)
    @RequestMapping("list")
    public BaseRespVo logList (LogBO pageBO){
        LogVO logList = logService.getLogList(pageBO);
        return new BaseRespVo().ok(logList);

    }

}
